﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="PedidoProveedor.aspx.cs" Inherits="ForrajeriaFRONT.ABM.PedidoProveedor" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/css">
        .style1
        {
            width: 100%;
        }
        .style2
        {
        }
        .style4
        {
        }
        .style5
        {
            width: 50px;
        }
        .style6
        {
            width: 174px;
        }
        .style15
        {
            height: 25px;
        }
        .style16
        {
            width: 50px;
            height: 25px;
        }
        .style17
        {
            width: 174px;
            height: 25px;
        }
        .style19
        {
            height: 10px;
        }
        .style20
        {
            width: 50px;
            height: 10px;
        }
        .style21
        {
            width: 174px;
            height: 10px;
        }
        .style25
        {
            width: 173px;
        }
        .style30
        {
            height: 31px;
        }
        .style31
        {
            width: 173px;
            height: 31px;
        }
        .style38
        {
            height: 25px;
            width: 191px;
        }
        .style41
        {
            height: 15px;
            width: 191px;
        }
        .style42
        {
            height: 15px;
        }
        .style43
        {
            width: 50px;
            height: 15px;
        }
        .style44
        {
            height: 10px;
            width: 191px;
        }
        .style45
        {
            width: 191px;
        }
    </style>
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:UpdatePanel ID="panelcito" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
        <table class="style1">
            <tr>
                <td class="style38">
                    <asp:Label ID="lblProveedor" runat="server" Text="Proveedor:"></asp:Label>
                    <br />
                </td>
                <td class="style19">
                    <asp:DropDownList ID="ddlProveedor" runat="server" Width="150px">
                    </asp:DropDownList>
                </td>
                <td class="style20" colspan="2">
                    </td>
                <td class="style19">
                    </td>
                <td class="style19" colspan="2">
                    </td>
                <td class="style21" colspan="2">
                    </td>
                <td class="style19">
                    </td>
            </tr>
            <tr>
                <td class="style44">
                    </td>
                <td class="style19">
                    </td>
                <td class="style20" colspan="2">
                    </td>
                <td class="style19">
                    </td>
                <td class="style19" colspan="2">
                    </td>
                <td class="style21" colspan="2">
                    </td>
                <td class="style19">
                    </td>
            </tr>            
            <tr>
                <td class="style19" colspan="11">
                    <asp:Label ID="lblProducto1" runat="server" Text="Seleccione el producto que desea agregar a su Pedido y la cantidad:"></asp:Label>
                </td>
            </tr>  
            <tr>
                <td class="style44">
                    </td>
                <td class="style19">
                    </td>
                <td class="style20" colspan="2">
                    </td>
                <td class="style19">
                    </td>
                <td class="style19" colspan="2">
                    </td>
                <td class="style21" colspan="2">
                    </td>
                <td class="style19">
                    </td>
            </tr>
            <tr>
                <td class="style38">
                    <asp:Label ID="lblProducto" runat="server" Text="Producto:"></asp:Label>
                    <br />
                </td>
                <td class="style19">
                    <asp:TextBox ID="txtProducto" runat="server" Width="150px"></asp:TextBox>
                </td>
                <td class="style16">
                    <asp:Label ID="lblMarca" runat="server" Text="Marca:"></asp:Label>
                </td>
                <td class="style15">
                    <asp:DropDownList ID="ddlMarca" runat="server" Width="150px">
                    </asp:DropDownList>
                </td>
                <td class="style15" colspan="2">
                    <asp:Label ID="lblEdad" runat="server" Text="Edad:"></asp:Label>
                </td>
                <td class="style17" colspan="2">
                    <asp:DropDownList ID="ddlEdad" runat="server"  Width="150px" 
                        style="margin-left: 0px">
                    </asp:DropDownList>
                </td>
                <td class="style15">
                    <asp:Button ID="btnBuscar" runat="server" Text="Buscar" Width="127px" 
                        onclick="btnBuscar_Click" CausesValidation="false" Height="27px" />
                </td>
            </tr>
            <tr>
                <td class="style44">
                </td>
                <td class="style19">
                </td>
                <td class="style20" colspan="2">
                    </td>
                <td class="style19">
                    </td>
                <td class="style19" colspan="2">
                    </td>
                <td class="style21" colspan="2">
                    </td>
                <td class="style19">
                    </td>
            </tr>
            <tr>
                <td class="style45">
                    <asp:Label ID="lblProducto0" runat="server" Text="Cantidad Necesaria:"></asp:Label>
                </td>
                <td class="style19">
                    <asp:TextBox ID="txtCantidad" runat="server" Width="150px"></asp:TextBox>
                </td>
                <td class="style5" colspan="2">
                    <asp:RequiredFieldValidator ID="rfvCantidad" runat="server" 
                        ControlToValidate="txtCantidad" Display="Dynamic" ErrorMessage="*" 
                        ForeColor="Red"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="rvCantidad" runat="server" 
                        ControlToValidate="txtCantidad" Display="Dynamic" ErrorMessage="*" 
                        ForeColor="Red" MaximumValue="10000" MinimumValue="1" Type="Integer"></asp:RangeValidator>
                    </td>
                <td colspan="6">
                    <asp:Label ID="lblMensaje" runat="server" ForeColor="Red"></asp:Label>
                    </td>
            </tr>
            <tr>
                <td class="style44">
                    &nbsp;</td>
                <td class="style19">
                    &nbsp;</td>
                <td class="style20" colspan="2">
                    &nbsp;</td>
                <td class="style19">
                    &nbsp;</td>
                <td class="style19" colspan="2">
                    &nbsp;</td>
                <td class="style21" colspan="2">
                    &nbsp;</td>
                <td class="style19">
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style4" colspan="11">
        <asp:GridView ID="gridDatos" runat="server"   
                CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%" 
                OnSelectedIndexChanging="gridDatos_SelectedIndexChanging" AutoGenerateColumns="False" 
                        DataKeyNames="codigo">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="nombreForraje" HeaderText="Producto"/>
                <asp:BoundField DataField="descripcion" HeaderText="Descripcion" />
                <asp:BoundField DataField="Nombre" HeaderText="Marca" />
                <asp:BoundField DataField="peso" HeaderText="Peso" />
                <asp:BoundField DataField="descripcionEdad" HeaderText="Edad" />
                <asp:BoundField DataField="stockActual" HeaderText="Stock Actual" />
                <asp:BoundField DataField="precio" HeaderText="Precio por Kilo" Visible="false" />
                <asp:CommandField ButtonType="Image" CancelText="" InsertText="" NewText="" 
                        SelectText="" UpdateText="" EditText="" 
                        HeaderText="Seleccionar" SelectImageUrl="~/images/selectBusqueda.jpg" 
                        ShowSelectButton="True" />
           
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                    HorizontalAlign="Center" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#EDEAE4" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
    
                </td>
            </tr>
            <tr>
                <td class="style45">
                    &nbsp;</td>
                <td class="style19" colspan="2">
                    &nbsp;</td>
                <td class="style5" colspan="2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td colspan="2">
                    &nbsp;</td>
                <td class="style6" colspan="2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style45">
                    <asp:Label ID="Label1" runat="server" Text="Su Pedido: "></asp:Label>
                </td>
                <td class="style19" colspan="2">
                    &nbsp;</td>
                <td class="style5" colspan="2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td colspan="2">
                    &nbsp;</td>
                <td class="style6" colspan="2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style45">
                    &nbsp;</td>
                <td class="style19" colspan="2">
                    &nbsp;</td>
                <td class="style5" colspan="2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td colspan="2">
                    &nbsp;</td>
                <td class="style6" colspan="2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" colspan="11">
        <asp:GridView ID="GridPedido" runat="server"   
                CellPadding="4" ForeColor="#333333" GridLines="None" Width="100%"
                EnableSortingAndPagingCallbacks="True" 
                OnRowDeleting="gridDatos_RowDeleting" AutoGenerateColumns="False">
            <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
            <Columns>
                <asp:BoundField DataField="nombreForraje" HeaderText="Producto"/>
                <asp:BoundField DataField="descripcion" HeaderText="Descripcion" />
                <asp:BoundField DataField="Nombre" HeaderText="Marca" />
                <asp:BoundField DataField="peso" HeaderText="Peso" />
                <asp:BoundField DataField="descripcionEdad" HeaderText="Edad" />
                <asp:BoundField DataField="cantidad" HeaderText="Cantidad" />
                <asp:CommandField ButtonType="Image" CancelText="" 
                        DeleteImageUrl="~/images/borrarABM.jpg" EditText="" InsertText="" NewText="" 
                        SelectText="" ShowDeleteButton="True" UpdateText="" ShowHeader="True" 
                        HeaderText="Quitar" />
           
            </Columns>
            <EditRowStyle BackColor="#999999" />
            <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" 
                    HorizontalAlign="Center" />
            <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#F7F6F3" ForeColor="#333333" HorizontalAlign="Center" />
            <SelectedRowStyle BackColor="#EDEAE4" Font-Bold="True" ForeColor="#333333" />
            <SortedAscendingCellStyle BackColor="#E9E7E2" />
            <SortedAscendingHeaderStyle BackColor="#506C8C" />
            <SortedDescendingCellStyle BackColor="#FFFDF8" />
            <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
        </asp:GridView>
    
                </td>
            </tr>
            <tr>
                <td class="style30" colspan="2">
                    </td>
                <td class="style31" colspan="2">
                    &nbsp;</td>
                <td class="style30" colspan="3">
                    </td>
                <td colspan="2" class="style30">
                    </td>
                <td class="style30">
                    </td>
                <td class="style30">
                    <asp:Label ID="lblTotal" runat="server" BackColor="#006699" ForeColor="White"></asp:Label>
                </td>
            </tr>
            <tr>
                <td colspan="2">
                    <asp:Label ID="Label2" runat="server" Text="Seleccione una fecha:"></asp:Label>
                </td>
                <td class="style25" colspan="2" rowspan="5">
                    <asp:Calendar ID="Calendar" runat="server" Width="183px"></asp:Calendar>
                </td>
                <td colspan="3" rowspan="4">
                </td>
                <td colspan="2" rowspan="4">
                </td>
                <td rowspan="4">
                </td>
                <td rowspan="4">
                    <asp:Button ID="btnGenerarPedido" runat="server" CausesValidation="False" 
                        Height="31px" onclick="btnGenerarPedido_Click" Text="Gererar Pedido" 
                        Width="133px" />
                </td>
            </tr>
            <tr>
                <td colspan="2">
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td colspan="2">
                </td>
                <td>
                    &nbsp;</td>
            </tr>
            <tr>
                <td class="style2" colspan="2">
                    &nbsp;</td>
                <td colspan="3">
                    &nbsp;</td>
                <td colspan="2">
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
